package com.aaa.eat.service.Impl;

import com.aaa.eat.mapper.MealMapper;
import com.aaa.eat.pojo.vo.MealVo;
import com.aaa.eat.result.AjaxResult;
import com.aaa.eat.service.MealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Author:张海金
 * Description:T0D0
 * DateTime:2022/3/16 11:22
 **/
@Service
public class MealServiceImpl implements MealService {
    @Autowired
    private MealMapper mealMapper;


    @Override
    public AjaxResult addMeal(MealVo mealVo) {
        int i = mealMapper.addMeal(mealVo);
        if (i>0){
            return AjaxResult.success();
        }else {
            return AjaxResult.fail("添加失败，请重试");
        }
    }
}
